﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CartDetails.aspx.cs" Inherits="Business.WebForm1" %>
 

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

   
<asp:Label ID="lblMessage" runat="server" >
</asp:Label>
    <asp:Label ID="lblTotalAmount" runat="server" Text=""></asp:Label>
<div>

    <asp:GridView ID="grdCartDetail" runat="server"  CellPadding ="4" Width="100%" 
        Height="88px" AllowPaging="True" AutoGenerateColumns="False" 
        onrowcommand="grdCartDetail_RowCommand" ForeColor="#333333" 
        GridLines="None" onrowdeleting="grdCartDetail_RowDeleting" 
        onrowupdating="grdCartDetail_RowUpdating" >
        <EditRowStyle BackColor="#999999" />
<FooterStyle ForeColor="White"  BackColor="#5D7B9D" Font-Bold="True"  />
    <RowStyle ForeColor="#333333" BackColor="#F7F6F3" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>

<asp:TemplateField  HeaderText="ProductID" Visible="false" >
    <EditItemTemplate>
        <asp:TextBox runat="server"  ID="productID" Text='<% #Bind("ProductID") %>'>
        </asp:TextBox>
    </EditItemTemplate>
    <ItemTemplate>
        <asp:Label ID="lblProductID" runat="server" Text='<%# Bind("ProductID") %>'></asp:Label>
    </ItemTemplate>
</asp:TemplateField>

 <asp:TemplateField HeaderText="Tên Sản Phẩm">
        <ItemTemplate>
            <asp:HyperLink ID="hpProductName" runat="server"  NavigateUrl='<%# "ProductDetails.aspx?ID="+Eval("ProductID") %>'        Text='<%# Eval("ProductName") %>'></asp:HyperLink>
        </ItemTemplate>
    </asp:TemplateField>
<asp:TemplateField HeaderText ="Số Lượng" SortExpression="Quantity" >
    <EditItemTemplate >
        <asp:TextBox ID="t1" runat="server" Text ='<% #Bind("Amount") %>' Width ="30px">
        </asp:TextBox>
    </EditItemTemplate>
    <ItemTemplate>
        <asp:TextBox ID="txtQuantity" runat="server" Text ='<% #Bind("Quantity") %>' Width="30px">
        </asp:TextBox>        
    </ItemTemplate>
    <ItemStyle HorizontalAlign ="Center" Wrap="False" />
</asp:TemplateField>



<asp:TemplateField HeaderText ="Đơn Giá" SortExpression="UnitPrice" >
    <ItemTemplate>
        <asp:Label ID="lblPrice" runat="server" Text ='<% # Eval("UnitPrice") %>' Width="30px">
        </asp:Label>      
    </ItemTemplate>
    <ItemStyle HorizontalAlign ="Center" Wrap="False" />
</asp:TemplateField>

<asp:TemplateField HeaderText ="" >
    <ItemTemplate>
        <asp:Label ID="l1" runat="server" Text ='<% # Eval("LineNet") %>' Width="30px">
        </asp:Label>      
    </ItemTemplate>
    <ItemStyle HorizontalAlign ="Center" Wrap="False" />
</asp:TemplateField>

<asp:ButtonField CommandName="Update" Text="Update" ControlStyle-ForeColor="Blue">

    
<ControlStyle ForeColor="Blue"></ControlStyle>    
</asp:ButtonField>


<asp:ButtonField CommandName="Delete" Text ="Delete">
   
</asp:ButtonField>
</Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:Button ID="cmdContinue" runat="server" Text="Continue" 
        onclick="cmdContinue_Click" />
<asp:Button ID="cmdPayment" runat="server" Text="Order" 
        onclick="cmdPayment_Click" />
</div>
</asp:Content>
